package com.pu.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.pu.entity.User;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.Map;

/**
 * @Author Yusc
 * @Date 2023/10/31 16:12
 * @Version
 * @Description 用户管理
 **/
@Mapper
public interface UserMapper extends BaseMapper<User> {
    /**
     * @param openid
     * @auther: Yusc
     * @date 2023/10/31 16:15
     * @Description 根据openid查用户
     */
    @Select("select * from user where openid = #{openid}")
    User getByOpenid(String openid);

    /**
    * @auther: Yusc
    * @date 2023/11/6 17:04
    * @Description 根据动态条件统计用户数量
    */
    Integer countByMap(Map map);
}
